package com.wuxu.aspectj.java;

import android.util.Log;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

/**
 * @author wuxu
 * @date 2024/6/21 18:12
 * @description 插桩类，这种类可以在编译时将桩（Advice）设定（通过PointCuts）到目标中（JoinPoint）
 */
@Aspect
public class AspectSecondActivityOnCreate {

    @Pointcut("execution(* com.wuxu.aspectj.SecondActivity.onCreate(..))")
    public void beforeCut(){}

    @Before("beforeCut()")
    public void beforeTest(JoinPoint joinPoint){
        Log.d("tttt-AspectSecondActivityOnCreate", "--before SecondActivity()"+joinPoint.getSignature());
    }
}
